<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function add(a,b){
            return a+b
        }
        function barPlot(arr_x, arr_y){
            let html = '<svg width="500" height="500" style="border:1px solid black">'
            for(let i=0;i<arr_x.length;i++){
                let x = arr_x[i]*50
                let y = 500 - arr_y[i]*50
                html += `<rect x="${x}" y="${y}" width="40" height="${arr_y[i]*50}" fill="pink"/>`
            }
            html += '</svg>'
            document.body.innerHTML = html
        }
        barPlot([1,2,3,4,5],[1,2,3,4,5])
    </script>

</body>
</html>